<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .red{
            height: 200px;
            /* 100vw为完整的视口宽度，包括滚动条 */
             width: 100vw; 
         
            background-color: red;
            font-size: 2em;
        }
        .green{
            height: 200px;
            width: 100%;
            background-color: green;
            font-size: 2rem;
        }
        html{
            font-size: 50px;
        }
        .father{
            font-size: 10px;
        }
    </style>
</head>
<body>
    <div class="father">
    <div class="red">锄禾日当午</div>
    </div>
    <div class="green">汗滴禾下土</div>

</body>
</html>